package com.likou.written.haikang;

import java.util.Date;

/**
 * Author: 陈桂明
 * Date: 2025/10/12 21:13
 * Description: haikang1
 */
public class haikang1 {
    public static void main(String[] args) {
        Date date = new Date();
        long time = date.getTime();
        System.out.println();
    }

    class Solution {

        public Solution() {
        }

        public String generateOrderNumber(Date date, String userId) {
            long time = date.getTime();

            return time + userId;
        }

        public Order getOrder(String orderNumber) {
            String time = orderNumber.substring(0, 14);
            String serial = orderNumber.substring(14, 20);
            String userId = orderNumber.substring(20);
            Date date = new Date(Long.parseLong(time));
            return new Order(date, serial, userId);
        }

    }

    class Order {
        private Date createDate;
        private String orderSerial;
        private String userId;

        public Order(Date createDate, String orderSerial, String userId) {
            this.createDate = createDate;
            this.orderSerial = orderSerial;
            this.userId = userId;
        }

        public String getOrderSerial() {
            return orderSerial;
        }

        public String getUserId() {
            return userId;
        }

        public Date getCreateDate() {
            return createDate;
        }
    }

}
